﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Teacher/Teacher.master" AutoEventWireup="true" CodeFile="ManageExhibitionDetails.aspx.cs" Inherits="Teacher_ManageExhibitionDetails" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <dx:ASPxGridView ID="gvwExhibition" runat="server" AutoGenerateColumns="False" 
        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
        DataSourceID="dataExhibitionDetails" 
        onrowvalidating="gvwExhibition_RowValidating" 
        KeyFieldName="Exhibition_Details_ID" Caption="Exhibition Details" 
        Width="100%">
        <Columns>
            <dx:GridViewCommandColumn VisibleIndex="0">
                <EditButton Visible="True">
                </EditButton>
                <NewButton Visible="True">
                </NewButton>
                <DeleteButton Visible="True">
                </DeleteButton>
                <UpdateButton Text="Save">
                </UpdateButton>
                <ClearFilterButton Visible="True">
                </ClearFilterButton>
            </dx:GridViewCommandColumn>
            <dx:GridViewDataComboBoxColumn FieldName="PostingID" VisibleIndex="2">
                <PropertiesComboBox DataSourceID="Posting" TextField="PostingID" 
                    ValueField="PostingID">
                </PropertiesComboBox>
            </dx:GridViewDataComboBoxColumn>
            <dx:GridViewDataComboBoxColumn FieldName="ExhibitionID" VisibleIndex="3">
                <PropertiesComboBox DataSourceID="Exhibition" TextField="ExhibitionID" 
                    ValueField="ExhibitionID">
                </PropertiesComboBox>
            </dx:GridViewDataComboBoxColumn>
            <dx:GridViewDataCheckColumn FieldName="Status" VisibleIndex="4">
            </dx:GridViewDataCheckColumn>
            <dx:GridViewDataTextColumn FieldName="Money_Paid" VisibleIndex="5">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataCheckColumn FieldName="Returned_Student" VisibleIndex="6">
            </dx:GridViewDataCheckColumn>
            <dx:GridViewDataTextColumn FieldName="Firtname_Customer" VisibleIndex="7">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Lastname_Customer" VisibleIndex="8">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Address_Customer" VisibleIndex="9">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Phone_Customer" VisibleIndex="10">
            </dx:GridViewDataTextColumn>
        </Columns>
        <Settings ShowFilterRow="True" />
        <Images SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/DevEx/GridView/StatusBarLoading.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <LoadingPanel ImageSpacing="5px">
            </LoadingPanel>
        </Styles>
        <StylesEditors ButtonEditCellSpacing="0">
            <ProgressBar Height="21px">
            </ProgressBar>
        </StylesEditors>
    </dx:ASPxGridView>
    <asp:SqlDataSource ID="Posting" runat="server" 
        ConnectionString="<%$ ConnectionStrings:Institte_of_Fine_ArtsConnectionString %>" 
        SelectCommand="SELECT [PostingID] FROM [Posting]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="dataExhibitionDetails" runat="server" 
        ConnectionString="<%$ ConnectionStrings:Institte_of_Fine_ArtsConnectionString %>" 
        DeleteCommand="DELETE FROM Exhibition_Details WHERE (Exhibition_Details_ID = @Exhibition_Details_ID)" 
        InsertCommand="INSERT INTO Exhibition_Details(PostingID, ExhibitionID, Status, Money_Paid, Returned_Student, Lastname_Customer, Firtname_Customer, Address_Customer, Phone_Customer) VALUES (@PostingID, @ExhibitionID, @Status, @Money_Paid, @Returned_Student, @Lastname_Customer, @Firtname_Customer, @Address_Customer, @Phone_Customer)" 
        SelectCommand="SELECT * FROM [Exhibition_Details]" 
        UpdateCommand="UPDATE Exhibition_Details SET PostingID = @PostingID, ExhibitionID = @ExhibitionID, Status = @Status, Money_Paid = @Money_Paid, Returned_Student = @Returned_Student, Firtname_Customer = @Firtname_Customer, Lastname_Customer = @Lastname_Customer, Address_Customer = @Address_Customer, Phone_Customer = @Phone_Customer WHERE (Exhibition_Details_ID = @Exhibition_Details_ID)">
        <DeleteParameters>
            <asp:Parameter Name="Exhibition_Details_ID" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="PostingID" />
            <asp:Parameter Name="ExhibitionID" />
            <asp:Parameter Name="Status" />
            <asp:Parameter Name="Money_Paid" />
            <asp:Parameter Name="Returned_Student" />
            <asp:Parameter Name="Lastname_Customer" />
            <asp:Parameter Name="Firtname_Customer" />
            <asp:Parameter Name="Address_Customer" />
            <asp:Parameter Name="Phone_Customer" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="PostingID" />
            <asp:Parameter Name="ExhibitionID" />
            <asp:Parameter Name="Status" />
            <asp:Parameter Name="Money_Paid" />
            <asp:Parameter Name="Returned_Student" />
            <asp:Parameter Name="Firtname_Customer" />
            <asp:Parameter Name="Lastname_Customer" />
            <asp:Parameter Name="Address_Customer" />
            <asp:Parameter Name="Phone_Customer" />
            <asp:Parameter Name="Exhibition_Details" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="Exhibition" runat="server" 
        ConnectionString="<%$ ConnectionStrings:Institte_of_Fine_ArtsConnectionString %>" 
        SelectCommand="SELECT [ExhibitionID] FROM [Exhibition]"></asp:SqlDataSource>
</asp:Content>

